package com.fly.feishu.infrastructure.persistent.po;

import lombok.*;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

/**
 * (WorkflowApproval)实体类
 *
 * @author makejava
 * @since 2021-10-12 00:43:56
 */
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class WorkApproval implements Serializable {
    private static final long serialVersionUID = 485157014773165820L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    private String instanceCode;
    /**
     * 审批定义 Code
     */
    private String approvalCode;
    /**
     * 审批名称
     */
    private String approvalName;
    /**
     * 申请理由
     */
    private String workReason;
    /**
     * 审批创建时间
     */
    private Date startTime;
    /**
     * 审批完成时间，未完成为 0
     */
    private Date endTime;
    /**
     * 发起审批用户
     */
    private String userId;
    /**
     * 发起审批用户 open id
     */
    private String openId;
    /**
     * 审批单编号
     */
    private String serialNumber;
    /**
     * 发起审批用户所在部门
     */
    private String departmentId;
    /**
     * 审批实例状态
     * PENDING - 审批中
     * APPROVED - 通过
     * REJECTED - 拒绝
     * CANCELED - 撤回
     * DELETED - 删除
     */
    private String status;
    /**
     * 用户的唯一标识id
     */
    private String uuid;
    /**
     * 审批意见
     */
    private String comment;
}